﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BidFunLib.Services;

namespace BidFunLib.Entity
{
    /// <summary>
    /// Operator type : Auto  / manu
    /// </summary>
    public class BidOperatorType
    {
        /// <summary>
        /// Technical identifier
        /// </summary>
        virtual public Int32 IdBidOperatorType { get; set; }

        /// <summary>
        /// Label of this operator Type
        /// </summary>
        virtual public String Name { get; set; }

        /// <summary>
        /// default Constructor mandatory for nhibernate
        /// </summary>
        public BidOperatorType()
        {
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="name"></param>
        public BidOperatorType(String name)
        {
            Name = name;
        }


        virtual public BidFunLib.Services.BidOperatorTypeManager.BID_OPERATOR_TYPE BidOperatorTypeAsEnum
        {
            get 
            {
                return (BidOperatorTypeManager.BID_OPERATOR_TYPE)Enum.Parse(typeof(BidFunLib.Services.BidOperatorTypeManager.BID_OPERATOR_TYPE), Name);
            }
        }
    }
}
